We let smooth scroll events that don't trigger a ::scroll signal through.
This is unintended, these are handled, even if just accumulated.
This fixes cases like GtkSpinButton inside GtkScrolledWindow, where both
would handle events, until the GtkSpinButton eventually shifts away from
underneath the pointer.
Brought up at https://gitlab.gnome.org/GNOME/gtk/-/issues/593
if (dx != 0 || dy != 0)
g_signal_emit (controller, signals[SCROLL], 0, dx, dy, &handled);
+ else if (direction == GDK_SCROLL_SMOOTH &&
+ (scroll->flags & GTK_EVENT_CONTROLLER_SCROLL_DISCRETE) != 0)
+ handled = scroll->active;
if (direction == GDK_SCROLL_SMOOTH &&
scroll->flags & GTK_EVENT_CONTROLLER_SCROLL_KINETIC)
{
g_signal_emit (controller, signals[SCROLL_END], 0);
scroll->active = FALSE;
+ handled = FALSE;
if (scroll->flags & GTK_EVENT_CONTROLLER_SCROLL_KINETIC)
{